package main

import (
	"encoding/json"
	"fmt"
)

type BaseResponse struct {
	ErrorCode int    `json:"error_code"`
	Error     string `json:"error"`
}

type TaskDebugData struct {
	Time string
	Jobs string
}

var machineStats = struct {
	BaseResponse
	Data []TaskDebugData `json:"data"`
}{}

func main() {

	str := `
{
    "error_code": 0,
    "error": "",
    "data": null
}`
	err := json.Unmarshal([]byte(str), &machineStats)
	fmt.Println(err, machineStats.Data)
}
